From: Jim Blandy Date: Sat, 12 Jun 1993 17:00:45 +0000 (+0000) Subject: * xterm.c (XTset_vertical_scroll_bar): Use double type for X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~95374 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=43f868f524a7ad7bed8b9e790996170fd7673eb2;p=emacs.git * xterm.c (XTset_vertical_scroll_bar): Use double type for intermediate results in scaling. --- diff --git a/src/xterm.c b/src/xterm.c index a9a10297bef..b5f87c46cc6 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -2135,8 +2135,8 @@ XTset_vertical_scroll_bar (window, portion, whole, position) x_scroll_bar_set_handle (bar, 0, top_range, 0); else { - int start = (position * top_range) / whole; - int end = ((position + portion) * top_range) / whole; + int start = ((double) position * top_range) / whole; + int end = ((double) (position + portion) * top_range) / whole; x_scroll_bar_set_handle (bar, start, end, 0); }